package by.grsu.epam.service;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.Criterion;

public interface GenericService<T, PK extends Serializable> {
	
	public PK save(T newInstance);
	
	public void update(T transientObject);
	
	public List<T> findAll();
	
	public List<T> findByCriteria(Criterion... criterion);
	
	public T findById(PK id);
	
	public void delete(PK id);
	
	public void delete(T persistantObject);
}
